﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using com.clinica.business.entities;
using LiclUtil;
using com.clinica.business.BE.seguridad;
using System.Globalization;
using System.Threading;

namespace wesiGestClinica.Shared
{
    public class SMGPaseBase : System.Web.UI.Page
    {
        public SMGPaseBase()
        { 
        
        }

        public UsuarioBE GetUsuario
        {
            get { return (UsuarioBE)HttpContext.Current.Session["UsuarioActual"]; }
        }
        override protected void OnInit(EventArgs e)
        {
            base.OnInit(e);
            this.DefineHandlers();

        }
        protected virtual void DefineHandlers()
        {
        }

        override protected void OnLoad(EventArgs e)
        {
            try
            {
                CultureInfo originalCulture = Thread.CurrentThread.CurrentCulture;
                Thread.CurrentThread.CurrentCulture = new CultureInfo("es-PE");
                Page page = HttpContext.Current.CurrentHandler as Page;
                ContentPlaceHolder cph = new ContentPlaceHolder();
                cph = (ContentPlaceHolder)Page.Master.FindControl("DefaultContent");
                base.OnLoad(e);
            }
            catch (Exception)
            {
                base.OnLoad(e);
            }
        }
    }
}
